package org.example.controller;

import org.example.service.DemoAnnotationService;
import org.example.service.DemoMethodService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class AnnotationController {

    @Autowired
    private DemoMethodService demoMethodService;

    @Autowired
    private DemoAnnotationService demoAnnotationService;

    @GetMapping("annotation")
    public String annotation() {
        demoAnnotationService.add();
        return "annotation";
    }

    @GetMapping("method")
    public String method() {
        demoMethodService.add();
        return "method";
    }
}
